package com.pro.controller;

import com.pro.mapper.JsCourseRecordMapper;
import com.pro.pojo.JsCourseRecord;
import com.pro.pojo.JsonData;
import com.pro.service.JsCourseRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author 祖铭泽
 * @Date 2022/1/13/0013
 * @description 审核 控制层
 */
@Controller
@RequestMapping(value = "/courseRecord")
public class JsCourseRecordController {
    @Autowired
    private JsCourseRecordService jsCourseRecordService;
    /**
     * @Author 祖铭泽
     * @Date 2022/1/13/0013
     * @description 根据课程id查询课程审核信息
     */
    @RequestMapping(value = "/getCourseAuditDetails")
    @ResponseBody
    public JsonData getCourseAuditDetails(JsCourseRecord jsCourseRecord) {
        return jsCourseRecordService.getCourseAuditDetails(jsCourseRecord);
    }
    /**
     * @Author 祖铭泽
     * @Date 2022/1/20/001
     * @description 添加课程审核记录
     */
    @RequestMapping(value = "/addCourseRecord")
    @ResponseBody
    public JsonData addCourseRecord(JsCourseRecord jsCourseRecord) {
        return jsCourseRecordService.addCourseRecord(jsCourseRecord);
    }
    /**
     * @Author 祖铭泽
     * @Date 2022/1/21/001
     * @description 查询待审核的课程、订单、微圈数量
     */
    @RequestMapping(value = "/getToAuditCount")
    @ResponseBody
    public JsonData getToAuditCount(JsCourseRecord jsCourseRecord) {
        return jsCourseRecordService.getToAuditCount(jsCourseRecord);
    }
}
